Skip to content

fix(metricsai): query reactors, not the removed users field, for review reactions - #50

Merged
bhodges-navapbc merged 1 commit into
mainfrom
fix/security-review-reactions
Jun 18, 2026
Merged

fix(metricsai): query reactors, not the removed users field, for review reactions#50
bhodges-navapbc merged 1 commit into
mainfrom
fix/security-review-reactions

Conversation

@bhodges-navapbc

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #49. Review summary-level 👍/👎 were never counted: the GraphQL lookup requested ReactionGroup.users, a field GitHub removed in 2021. The query errored, PyGithub raised, and the except turned it into (0,0) — so a thumbs-down on a submitted review was silently
dropped.

Fix

  • Query reactionGroups { content reactors { totalCount } } (the current field), with a users fallback for old GitHub Enterprise.
  • Regression test asserting 👎 lands in thumbs_down (not thumbs_up), plus a legacy-users parse test.

Verify

metricsai --debug no longer logs review reactions lookup failed … for reviews carrying reactions, and a review's 👎 now increments security_thumbs_downs.

🤖 Generated with Claude Code

…ew reactions

The GraphQL reaction lookup for review summaries asked for ReactionGroup.users, a field GitHub removed in 2021, so the query errored and PyGithub raised — silently swallowed to (0,0).
Every review summary 👍/👎 was therefore dropped (a 👎 went uncounted). Switch to the current 'reactors { totalCount }' (with a 'users' fallback for old GHE) and add a regression test asserting 👎 maps to thumbs_down.

Co-Authored-By: Claude Opus 4.8 (1M context)
<noreply@anthropic.com>
@bhodges-navapbc
bhodges-navapbc merged commit 503dc0f into main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant